There are ways to check if a sprite is a clone.
Note that it only works for temporary clones which are created programmatically.
Since a clone is usually temporary, you can just check if it is temporary.
(my [temporary? V])
While this is not a surefire solution, as you can have permanent clones, it still works for most cases, as permanent clones don't come up very often.
Another solution is to check if the clone has a parent.
<is (my [parent V]) a [sprite V] ?>
This is also not a perfect solution, since you can set the parent of regular sprites.
A sprite has a list of all their temporary clones in (my [clones V])
, which can be used in combination with (ask [ V] for (() @addInput) @verticalEllipsis @addInput)
and (my [parent V])
to determine if a sprite is a clone.
(if (my [parent V]) then <(ask (my [parent V]) for ((my [clones V]) @addInput) @verticalEllipsis @addInput) contains (my [self V])> else <false>)
You can create a sprite-only variable, and then set it to false in the sprite, and true in clones.
when flag clicked set [clone? V] to <false> when I start as a clone set [clone? V] to <true>
This works very well, because sprite-only variables are unique to each clone.